home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir39
/
echoblk.zip
/
ECHOBLOK.DOC
next >
Wrap
Text File
|
1993-10-14
|
5KB
|
84 lines
________ECHOBLOK Ver. 2.30
Purpose: EchoBlok is made to be used with DOS 6's CONFIG.SYS menu system.
It prints on screen just the parts of a CONFIG.SYS file that would
be operative under a given menu choice. You might use it in a DOS
boot-up screen, and it may be useful in debugging a complex
CONFIG.SYS.
Format: ECHOBLOK [filespec] [header]
________ Both parameters are optional. filespec defaults to CONFIG.SYS (in
______ the current directory). There's no default for header.
You may but needn't put [brackets] around the header spec.
If you give only one parameter, EchoBlok tries to open a file by
that name. If it can, it prints the whole file. If there's no
such file, it takes the parameter for a block specification and
looks in CONFIG.SYS (in the current directory);
DOS puts the name of the header chosen at the CONFIG.SYS menu into
an environment variable, CONFIG. Therefore, you can cover most of
the ground in an AUTOEXEC.BAT line that runs:
ECHOBLOK C:\CONFIG.SYS %CONFIG%
Remarks: My AUTOEXEC.BAT leaves me in DOS, with a screen showing informa-
tion about what's running, what TSR's are loaded, etc. In the
past, I kept a small stable of CONFIG.SYS files to swap in as
wanted. So, usually, it was convenient to simply TYPE the whole
CONFIG.SYS file onto the boot-up screen to show what's going on.
DOS 6 gives us a menu system in CONFIG.SYS now, so all my little
CONFIG.xxx files are collected into one, and I get to choose from
a menu. It's convenient, but now CONFIG.SYS is too big to fit on
a screen, and most of it's irrelevant, because only the block I
called for is operative. Hence, EchoBlok. It reads CONFIG.SYS
and puts on the screen the text of the header block called for.
There are two complications. First, if there are several blocks
in CONFIG.SYS with the same name (it would be a bungle), only the
first one will be used. The exception is [COMMON]. DOS will exe-
cute every block with this label, however many. Second, an IN-
CLUDE statement in one block will activate another. INCLUDEs are
recursive, so blocks INCLUDEd in an INCLUDEd block will also be
executed. EchoBlok reads the file just the way DOS 6 does and
displays exactly the lines that DOS 6 would execute, in the order
in which DOS 6 would execute them.
If you give a single parameter, EchoBlok tries it as a filespec.
If it can't find such a file, it takes it for the header name, and
EchoBlok will look at CONFIG.SYS. You can force it to be a header
block by [bracketing] it. If you give two parameters, the first
becomes the filename and the second becomes the header name. If
there's no header request or if the header it's looking for isn't
in the file, EchoBlok will say so and print the whole file. If
you give no parameters (or just ?), you get a help screen.
Since EchoBlok writes to standard output, you can redirect its
output to a printer or a file.
________ECHOBLOK Page 2
Version History:
1.00 Printed executable lines in order of their appearance.
(8/93)
2.00 Printed in order of execution. (8/93)
2.10 Parameter /ALL prints the whole file. (not issued) (9/93)
2.20 If header not found or not given, prints the whole file.
(10/93)
2.30 Bugs fixed: [COMMON] blocks correctly reproduced, Blocks
end on next [header] (not on blank line), reads read-
only files. (10/93)
Legal notice:
(C) Copyright R. N. Wisan, 1993. All rights waived except that no
one has permission to deny anyone permission to use or distribute
this program and its DOC.
R. N. Wisan, October, 1993
37 Clinton St., Oneonta, NY 13820
internet: WISANR@hartwick.edu